package top.yueyazhui.vhr.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

@ApiModel(value = "资源实体类", description = "资源信息描述类")
public class Menu implements Serializable {

    @ApiModelProperty(value = "资源ID")
    private Integer id;
    @ApiModelProperty(value = "资源URL")
    private String url;
    @ApiModelProperty(value = "资源路径")
    private String path;
    @ApiModelProperty(value = "资源组件")
    private String component;
    @ApiModelProperty(value = "资源名称")
    private String name;
    @ApiModelProperty(value = "资源元对象")
    private Meta meta;
    @ApiModelProperty(value = "父ID")
    private Integer parentId;
    @ApiModelProperty(value = "是否启用")
    private Boolean enabled;
    @ApiModelProperty(value = "资源子级列表")
    private List<Menu> children;
    @ApiModelProperty(value = "资源角色列表")
    private List<Role> roles;

    @Override
    public String toString() {
        return "Menu{" +
                "id=" + id +
                ", url='" + url + '\'' +
                ", path='" + path + '\'' +
                ", component='" + component + '\'' +
                ", name='" + name + '\'' +
                ", meta=" + meta +
                ", parentId=" + parentId +
                ", enabled=" + enabled +
                ", children=" + children +
                ", roles=" + roles +
                '}';
    }

    public Menu() {
    }

    public Menu(Integer id, String url, String path, String component, String name, Meta meta, Integer parentId, Boolean enabled, List<Menu> children, List<Role> roles) {
        this.id = id;
        this.url = url;
        this.path = path;
        this.component = component;
        this.name = name;
        this.meta = meta;
        this.parentId = parentId;
        this.enabled = enabled;
        this.children = children;
        this.roles = roles;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Meta getMeta() {
        return meta;
    }

    public void setMeta(Meta meta) {
        this.meta = meta;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }
}